UNPKG

1.42 kBTypeScriptView Raw
1import { SVGCommand, CommandM, CommandL, CommandH, CommandV, CommandZ, CommandQ, CommandT, CommandC, CommandS, CommandA } from 'svg-pathdata/lib/types';
2import { SVGPathData } from 'svg-pathdata';
3import Point from './Point';
4export declare type CommandType = SVGCommand['type'];
5export declare type Command = {
6 type: CommandType;
7} & Omit<CommandM, 'type'> & Omit<CommandL, 'type'> & Omit<CommandH, 'type'> & Omit<CommandV, 'type'> & Omit<CommandZ, 'type'> & Omit<CommandQ, 'type'> & Omit<CommandT, 'type'> & Omit<CommandC, 'type'> & Omit<CommandS, 'type'> & Omit<CommandA, 'type'>;
8export default class PathParser extends SVGPathData {
9 control: Point;
10 start: Point;
11 current: Point;
12 command: Command;
13 readonly commands: Command[];
14 private i;
15 private previousCommand;
16 private points;
17 private angles;
18 reset(): void;
19 isEnd(): boolean;
20 next(): Command;
21 getPoint(xProp?: string, yProp?: string): Point;
22 getAsControlPoint(xProp?: string, yProp?: string): Point;
23 getAsCurrentPoint(xProp?: string, yProp?: string): Point;
24 getReflectedControlPoint(): Point;
25 makeAbsolute(point: Point): Point;
26 addMarker(point: Point, from?: Point, priorTo?: Point): void;
27 addMarkerAngle(point: Point, angle: number): void;
28 getMarkerPoints(): Point[];
29 getMarkerAngles(): number[];
30}
31//# sourceMappingURL=PathParser copy.d.ts.map
\No newline at end of file